#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int Strlen(char* arr)
{
	int count = 0;
	while (*arr != '\0')
	{
		count++;
		arr++;
	}
	return count;
}
void reverse(char* arr)
{
	int len = Strlen(arr);
	char tmp = *arr;
	*arr = *(arr + len - 1);
	*(arr + len - 1) = '\0';
	if (Strlen(arr + 1) >= 2)
	{
		reverse(arr + 1);
	}
		*(arr + len - 1) = tmp;
	
}

int main()
{
	char arr[] = "abcdefg";

	reverse(arr);

	printf("%s\n", arr);
	return 0;
}